<template>
  <div class="wi-container">
    <p class="title">{{ title }}</p>
    <p @click="handle">{{ text }}</p>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from "vue";

export default defineComponent({
  setup() {
    const title = ref("渐进式JavaScript 框架");
    const text: String = "点击触发事件";
    return {
      title,
      text,
    };
  },
  methods: {
    handle() {
      console.log("点击事件触发");
    },
  },
});
</script>

<style lang="scss" scoped>
.title {
  text-align: center;
  color: $color-main;
}
</style>
